<div class="container">
	<h1>Minhas promoções</h1>
	
	<ul class="nav nav-tabs" role="tablist">
		<li role="presentation" class="active"><a href="#ativas" role="tab" data-toggle="tab">Ativas</a></li>
		<li role="presentation"><a href="#concluidas" role="tab" data-toggle="tab">Concluidas</a></li>
	</ul>

	<div class="tab-content">
	  	<div role="tabpanel" class="tab-pane active" id="ativas">
	  		<ul class="list-group">
				<?php 

				if(count($promocoes_ativas)>0){
					foreach($promocoes_ativas as $promocao){ ?>	
			  		<li class="list-group-item">
			  			<div class="col-sm-2 hidden-xs">
			      			<img src="<?=URL;?>public/uploads/<?=$promocao->foto;?>" style="width: 100%; height: auto" class="img-thumbnail">
			    		</div>
			    		<div class="col-sm-10 col-xs-12">
			      			<h3><?=$promocao->nome;?></h3>
			      			<h4><?=$promocao->desconto;?> %</h4>
			      			<h5>Restam <?=$promocao->diasRestantes;?> dias de promoção</h5>
							
							<a href="<?=URL;?>promocoes/minhas_promocoes/cancel/<?=$promocao->id;?>" class="btn btn-primary btn-xs">Cancelar promoção</a>
						</div>
			    		<div class="clearfix"></div>
			  		</li>
			  <?php 
			  		}
		  		} ?>

			</ul>
	  	</div>

	  	<div role="tabpanel" class="tab-pane" id="concluidas">
	  		<ul class="list-group">
				<?php
				if(count($promocoes_concluidas)>0){
					foreach($promocoes_concluidas as $promocao){ ?>	
			  		<li class="list-group-item">
			  			<div class="col-sm-2 hidden-xs">
			      			<img src="<?=URL;?>public/uploads/<?=$promocao->foto;?>" style="width: 100%; height: auto" class="img-thumbnail">
			    		</div>
			    		<div class="col-sm-10 col-xs-12">
			      			<h3><?=$promocao->nome;?></h3>
			      			<h4><?=$promocao->desconto;?> %</h4>
		    		</div>
		    		<div class="clearfix"></div>
		  		</li>
		  		<?php }

		  		} ?>

			</ul>
	  	</div>
	  	
	</div>

	
	


</div>